ARCH := arm
CROSS_COMPILE := arm-linux-gnueabihf-
KERNELDIR := /home/yushuang/nxplinux/linux-net
CURRENT_PATH := $(shell pwd)

# Application target
APP_NAME := blockioApp

obj-m := blockio.o

build: kernel_modules app

kernel_modules:

app:
	$(CROSS_COMPILE)gcc -o $(APP_NAME) $(APP_NAME).c
	$(MAKE) ARCH=$(ARCH) CROSS_COMPILE=$(CROSS_COMPILE) -C $(KERNELDIR) M=$(CURRENT_PATH) modules

clean:
	rm -f $(APP_NAME)
	$(MAKE) ARCH=$(ARCH) CROSS_COMPILE=$(CROSS_COMPILE) -C $(KERNELDIR) M=$(CURRENT_PATH) clean
